<script>
  var arr = [{label:'男',value: 1}, {label:'女',value: 0}]
 
 function f(arr) {
   // 写代码，得到
   let arr2 =[]
  arr.forEach(item => {
  
   arr2.push(item.label)
  })
  return arr2
 }
 var arr2 = f(arr);
 console.log(arr2)
 // arr2 = ['男', '女']
</script>